from collections.abc import Generator

from _typeshed import Incomplete
from typing import Iterator

from ducktape.cluster.cluster import ClusterNode

class NodeNotPresentError(Exception): ...
class InsufficientResourcesError(Exception): ...

class NodeContainer:
    os_to_nodes: Incomplete

    def __init__(self, nodes: Incomplete | None = ...) -> None: ...
    def size(self): ...
    def __len__(self) -> int: ...
    def __iter__(self) -> Iterator[ClusterNode]: ...
    def elements(
        self, operating_system: Incomplete | None = ...
    ) -> Generator[Incomplete, None, None]: ...
    def add_node(self, node) -> None: ...
    def add_nodes(self, nodes) -> None: ...
    def remove_node(self, node): ...
    def remove_nodes(self, nodes) -> None: ...
    def remove_spec(self, cluster_spec): ...
    def can_remove_spec(self, cluster_spec): ...
    def attempt_remove_spec(self, cluster_spec): ...
    def clone(self): ...
